import React, { Component } from 'react';
import {render} from 'react-dom';
import { DropdownButton,MenuItem } from 'react-bootstrap';

var fav = [
    {
    "webname":"hao123",
    "webaddress":"https://www.hao123.com/"
    },
    {
        "webname":"百度搜索",
        "webaddress":"http://www.baidu.com"
    },
    {
        "webname":"百度新新闻",
        "webaddress":"http://news.baidu.com/"
    },
    {
        "webname":"百度学术",
        "webaddress":"http://xueshu.baidu.com/"
        }
];

class Favourites extends Component{
    constructor(props){
        super(props);
    }
    render(){
        let favItems = fav.map((item,i) => {
            return <MenuItem eventKey={i} key={i} >{item.webname} {item.webaddress}</MenuItem>
        });
        return (

                <DropdownButton bsSize="xsmall"  bsStyle="default" id="favourites-websites" title="">
                    {favItems}
                </DropdownButton>

        );
    }
}

export default Favourites;